package com.zll.feign;

import com.zll.Store;
import com.zll.utils.JsonResult;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;

@Component
public class StoreServiceFallbackFactory implements FallbackFactory<StoreService> {
    @Override
    public StoreService create(Throwable throwable) {
        return new StoreService() {
            @Override
            public JsonResult add(Store store) {
                return new JsonResult(false,"家人，程序猿顶不住了，等会再来吧");
            }
        };
    }
}
